package cn.itsource.hrm.service.impl;

import cn.itsource.hrm.domain.User;
import cn.itsource.hrm.mapper.UserMapper;
import cn.itsource.hrm.service.IUserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户信息表 服务实现类
 * </p>
 *
 * @author Jason
 * @since 2021-10-11
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public void deleteAllUser() {
        userMapper.deleteAllUser();
    }

    /**
     * 这里批量添加数据有三种方式
     * 1、foreach批量插入（性能最好）
     * 2、mybatis batch模式插入
     * 3、for循环insert
     */
    @Override
    public void addUser(int count) {
    }

    //多线程方式添加数据
    @Override
    public void addUserThreadPool(int count) {//1000000
    }
}
